package system.model.compare;

import common.model.compare.BaseCompare;
import lombok.Data;

import java.util.Objects;

/**
 * @author 米泽鹏
 * @since 2022-3-13 下午 11:18
 */
@Data
public class SysRoleAuthorityCompare extends BaseCompare {

	/**
	 * 角色id
	 */
	private Long roleId;

	/**
	 * 角色编码
	 */
	private String roleCode;

	/**
	 * 角色名称
	 */
	private String roleName;

	/**
	 * 权限id
	 */
	private Long authId;

	/**
	 * 权限名称
	 */
	private String authName;

	@Override
	public boolean equals(Object o) {
		if (this == o) {
			return true;
		}
		if (!(o instanceof SysRoleAuthorityCompare)) {
			return false;
		}
		SysRoleAuthorityCompare that = (SysRoleAuthorityCompare) o;
		return Objects.equals(getRoleId(), that.getRoleId()) && Objects.equals(getAuthId(), that.getAuthId());
	}

	@Override
	public int hashCode() {
		return Objects.hash(getRoleId(), getAuthId());
	}

}
